import { createRouter, createWebHistory } from 'vue-router'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    { 
      path: '/',
      component: () => import('../views/love/love.vue'),
      name: 'love',
      children: [
        {
          path: 'empty',
          name: 'empty',
          meta: { showContent: false }
        },
        {
          path: 'square',
          component: () => import('../views/love/square.vue'), // 注意大小写
          name: 'square',
          meta: { showContent: true }
        },
        {
          path: 'baseinfo',
          component: () => import('../views/love/baseinfo.vue'), // 注意大小写
          name: 'baseinfo',
          meta: { showContent: true }
        },
        {
          path:'goods',
          component: () => import('../views/love/goods.vue'), // 注意大小写
          name: 'goods',
          meta: { showContent: true },
        },
        {
          path:'housekeeping',
          component: () => import('../views/love/housekeeping.vue'), // 注意大小写
          name: 'housekeeping',
          meta: { showContent: true }
        },
        {
          path:'clean',
          component: () => import('../views/love/clean.vue'), // 注意大小写
          name: 'clean',
          meta: { showContent: true }
        },
        {
          path:'loveChild',
          component: () => import('../views/love/loveChild.vue'), // 注意大小写
          name: 'loveChild',
          meta: { showContent: true }
        },
      ]
    },
    {
      path: '/love/login',
      component: () => import('../views/love/login.vue'),
      name: 'login'
    },
    {
      path: '/love/register',
      component: () => import('../views/love/register.vue'),
      name:'Register' // 保持命名一致性
    },
    {
      path:'/love/own',
      component: () => import('../views/love/own.vue'), // 注意大小写
      name: 'own'

    },
  ]
})

export default router